function GetImage(control) {
  return `images/${control.Id}.svg`
}

function GetImage_png(control) {
  return `images/${control.Id}.png`
}

function OnAction(control) {
  const aiId = control.Id;
  let taskPane;
  switch (aiId) {
    case 'lingxi':
      //taskPane = window.Application.CreateTaskPane('lingxi.wps.cn/');
      wps.OAAssist.ShellExecute("https://lingxi.wps.cn/");
      //taskPane = wps.CreateTaskPane("https://lingxi.wps.cn/");//在 WPS 中，创建任务窗格的正确方法
      break;
    case 'deepseek':
      taskPane = window.Application.CreateTaskPane('www.wenxiaobai.com/');
      break;
    case 'doubao':
      taskPane = window.Application.CreateTaskPane('www.doubao.com/chat');
      break;
    case 'kimi':
      taskPane = window.Application.CreateTaskPane('kimi.moonshot.cn');
      break;
    case 'qwen':
      taskPane = window.Application.CreateTaskPane('tongyi.aliyun.com/qianwen');
      break;
    case 'yuanbao':
      taskPane = window.Application.CreateTaskPane('yuanbao.tencent.com/chat');
      break;
    case 'wenxinyiyan':
      taskPane = window.Application.CreateTaskPane('yiyan.baidu.com');
      break;
    case 'xunfeixinhuo':
      taskPane = window.Application.CreateTaskPane('xinghuo.xfyun.cn/desk');
      break;
    case 'zhipuqingyan':
      taskPane = window.Application.CreateTaskPane('chatglm.cn/main');
      break;
    case 'tiangong':
      taskPane = window.Application.CreateTaskPane('www.tiangong.cn');
      break;
    case 'chatgpt':
      taskPane = window.Application.CreateTaskPane('chatgpt.com');
      break;
    case 'liblib':
      //taskPane = window.Application.CreateTaskPane('www.liblib.art');
      wps.OAAssist.ShellExecute('www.liblib.art');
      break;

    case 'PDF24':
      wps.OAAssist.ShellExecute('www.pdf24.org');
      break;
    case 'ilovepdf':
      wps.OAAssist.ShellExecute('www.ilovepdf.com');
      break;
    case 'moyu':
      taskPane = window.Application.CreateTaskPane('www.douyin.com');
      break;
    case 'moyu1':
      taskPane = window.Application.CreateTaskPane('www.xiaohongshu.com/explore');
      break;
    case 'nadoutong':
      taskPane = window.Application.CreateTaskPane('paper.people.com.cn');
      break;
    default:
      taskPane = window.Application.CreateTaskPane('chat.deepseek.com');
      break;
  }
  taskPane.Visible = true;
}
